<template>
  <section class="afterScheduleData">
    <ul>
      <li v-for="(name, index) of auditReasonsKeys" :key="index">
        <div class="flex afterScheduleFont oneMarginDiv">
          <div>{{name}}</div>
          <div >{{stateData.auditDate}}</div>
        </div>

        <!--审核不过原因组件开始-->
        <after-reason :auditReasons="stateData.auditReasons[name]"/>
        <!--审核不过原因组件结束-->
      </li>
    </ul>
  </section>
</template>

<script>
import afterReason from 'views/inquiry-dateils/inquiry-reason'
export default {
  props: {
    stateData: {
      type: Object
    }
  },
  components: {
    afterReason
  },
  computed: {
    auditReasonsKeys () {
      if (this.stateData.auditReasons) {
        return Object.keys(this.stateData.auditReasons)
      } else {
        return []
      }
    }
  }
}
</script>

<style lang="scss" scoped>
@import '~assets/scss/public/public.scss';
@import '~assets/scss/public/var.scss';
@include flex(space-between, center);
.afterScheduleData {
  background: $colorWhite;
  box-sizing: border-box;
  // padding: .5rem;
  .afterScheduleFont {
    font-size: $fontSize8;
    color: $colorBlack;
    font-family: PingFangSC-Regular;
    box-sizing: border-box;
    padding: .5rem;
  }
}
</style>
